﻿#region Using Statements
using System;
#endregion

namespace DirectZZT.Shared.World
{
    /// <summary>
    /// Provides helper methods for feature sets.
    /// </summary>
    public static class FeatureSetHelper
    {
        /// <summary>
        /// Checks if the given feature is supported in the feature set.
        /// </summary>
        /// <param name="featureSet"></param>
        /// <param name="feature"></param>
        /// <returns></returns>
        public static bool IsFeatureSupported(this FeatureSet featureSet, Feature feature)
        {
            switch (feature)
            {
                case Feature.Invalid: return false;
                case Feature.FlagsWithValues:
                case Feature.MoreThanOneScript:
                case Feature.MoreThanTenFlags:
                    return featureSet == FeatureSet.DirectZZT;
            }
            return true;
        }
    }
}
